//
//  TRRequest.h
//  SafePay
//
//  Created by  ztryxh on 2018/6/15.
//  Copyright © 2018年 ebo. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AFNetworking.h>
@class TRRequest;
@protocol TRRequestDelegate <NSObject>
-(void)TRRequest:(TRRequest *)request finished:(NSString *)response;
-(void)TRRequest:(TRRequest *)request Error:(NSString *)error;
@end
@interface TRRequest : NSObject
@property (assign) id<TRRequestDelegate>delegate;
@property (nonatomic,strong) AFHTTPSessionManager *operationManager;
@property (nonatomic,strong) NSOperationQueue *operationQueue;

+(instancetype)request;

-(void)Get:(NSString *)URLString parameters:(NSDictionary *)parameters success:(void (^)(TRRequest*,NSDictionary *))success failure:(void (^)(TRRequest *,NSError *))failure;
-(void)Post:(NSString *)URLString parameters:(NSDictionary *)parameters success:(void(^)(TRRequest *request,NSDictionary *responseDict))success failure:(void(^)(TRRequest *request,NSError *error))failure;
@end
